package main

import (
	"fmt"
	"net/http"
	"os"
)

func main() {
	os.Setenv("VERSION","1")
	http.HandleFunc("/healthz", healthz)
	http.ListenAndServe(":80", nil)
}

func healthz(w http.ResponseWriter, req *http.Request) {
	for name, headers := range req.Header {
		for _, h := range headers {
			w.Header().Add(name,h)
		}
	}
	w.Header().Add("VERSION",os.Getenv("VERSION"))
	fmt.Fprintf(w, "200\n")
}